package com.hf.buildtb.entity;
// default package

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;


/**
 * BiDepartment entity. @author MyEclipse Persistence Tools
 */
/**
 * @author Crunk
 *
 */
@Entity
@Table(name="BI_Department"
    ,schema="dbo"
    ,catalog="BIDB"
)

public class BiDepartment  implements java.io.Serializable {


    // Fields    

     /**
	 * 
	 */
	private static final long serialVersionUID = 1642856056327887158L;
	private String depId;
     private String depName;
 
     private BiDepartmentClass depClass;
     
     @ManyToOne(cascade=CascadeType.ALL,fetch=FetchType.EAGER)
     @JoinColumn(name="corpId")
     public BiCorporation getCorporation() {
		return corporation;
	}

	public void setCorporation(BiCorporation corporation) {
		this.corporation = corporation;
	}

	private BiCorporation corporation;
     
     @ManyToOne(cascade=CascadeType.ALL,fetch=FetchType.EAGER)
     @JoinColumn(name="classId" ,columnDefinition="char(4)")
     public BiDepartmentClass getDepClass() {
		return depClass;
	}

	public void setDepClass(BiDepartmentClass depClass) {
		this.depClass = depClass;
	}

	private Boolean isValid;
     private String hisId;
     private String hisName;
     private String py;
     private String wb;


    // Constructors

    /** default constructor */
    public BiDepartment() {
    }

	/** minimal constructor */
    public BiDepartment(String depId, String depName, String corpId, String corpName) {
        this.depId = depId;
        this.depName = depName;

        
    }
    
    /** full constructor */
    public BiDepartment(String depId, String depName, String corpId, String corpName, String hisId, String hisName, String py, String wb) {
        this.depId = depId;
        this.depName = depName;

 
       
        this.hisId = hisId;
        this.hisName = hisName;
        this.py = py;
        this.wb = wb;
    }

   
    // Property accessors
    @Id 
    
    @Column(name="depId", nullable=false, length=32)

    public String getDepId() {
        return this.depId;
    }
    
    public void setDepId(String depId) {
        this.depId = depId;
    }
    
    @Column(name="depName", nullable=false, length=64)

    public String getDepName() {
        return this.depName;
    }
    
    public void setDepName(String depName) {
        this.depName = depName;
    }
    
   
    
   
    @Column(name="isValid", nullable=false)

    public Boolean getIsValid() {
        return this.isValid;
    }
    
    public void setIsValid(Boolean isValid) {
        this.isValid = isValid;
    }
    
    @Column(name="hisId", length=32)

    public String getHisId() {
        return this.hisId;
    }
    
    public void setHisId(String hisId) {
        this.hisId = hisId;
    }
    
    @Column(name="hisName", length=64)

    public String getHisName() {
        return this.hisName;
    }
    
    public void setHisName(String hisName) {
        this.hisName = hisName;
    }
    
    @Column(name="py", length=23)

    public String getPy() {
        return this.py;
    }
    
    public void setPy(String py) {
        this.py = py;
    }
    
    @Column(name="wb", length=23)

    public String getWb() {
        return this.wb;
    }
    
    public void setWb(String wb) {
        this.wb = wb;
    }
   








}